<?php

use Hyperf\Database\Schema\Schema;
use Hyperf\Database\Schema\Blueprint;
use Hyperf\Database\Migrations\Migration;

class CreateCooperativeRole extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('cooperative_role', function (Blueprint $table) {
            $table->integerIncrements('id');
            $table->unsignedInteger('cooperative_id')->comment('合作商id');
            $table->string('name', 24);
            $table->string('remark', 32)->default('');
            $table->unsignedTinyInteger('status')->default(0)->comment('1:启用，0：未启用');
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('cooperative_role');
    }
}
